// 补全Proxy内的方法 使取得不存在的值时报出错误 Property “$(property)” does not exist
const man = {
  name: 'jscoder',
  age: 22
};
const proxy = new Proxy(man, {
  get(target, property) {
    return property in target ? target[property] : new Error('Property “$(property)” does not exist');
  }
});
console.log(proxy.name);
console.log(proxy.age);
console.log(proxy.location);
